{include file="file:$theme_global/admin/_header.tpl"
	context_nav="$theme_global/admin/_resource-nav.tpl"
}
<div class="box">
<h1>{$module_title} Resources for <span class="white">{$role.shortname}</span></h1>
{include file="file:$theme_global/admin/_messages.tpl"}

<form action="/resource/edit/id/{$role.id}/modid/{$modid}" method="post">
	{foreach from=$actions key=module_name item=module}
			{foreach from=$module key=controller_name item=controller}
				
					<h3>{$controller_name}</h3>
					<ul class="checkboxlist">
						{foreach from=$controller key=action_name item=action}
							<li>
								{if $action.inherited}
									<input type="checkbox" checked="checked" id="{$module_name}-{$controller_name}-{$action_name}" disabled="disabled"/> <label for="{$module_name}-{$controller_name}-{$action_name}">{$action_name} <i>(inheritied)</i></label>
								{else}
									<input type="checkbox" name="resource[]" id="{$module_name}-{$controller_name}-{$action_name}" value="{$module_name}-{$controller_name}-{$action_name}" {if $action.allowed}checked="checked"{/if}/> <label for="{$module_name}-{$controller_name}-{$action_name}">{$action_name}</label>
								{/if}
							</li>
						{/foreach}
					</ul>
			{/foreach}
	{/foreach}	
	<p><input type="submit" class="button" value="Save"/></p>
</form>

</div>
{include file="file:$theme_global/admin/_footer.tpl"}
